<template>
	<view>
		<view class="search-box">
			<my-search @click="gotoSearch"></my-search>
		</view>
    <uni-section title="" type=""  class="box">
    			<uni-card v-for="(item,i) in ServersList" :key="i"  :title="item.teamName" :sub-title="`创建人:${item.createBy}`":thumbnail="item.imgUrl" @click="goToOrgInfo(item.teamId)">
            <text>说明：{{item.teamInfo}}</text>
    			</uni-card>
    </uni-section>
	</view>
</template>

<script>
  import { selectmyServers } from "@/api/team/team"
	export default {
		data() {
			return {
				url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png',
        ServersList:[]
			};
		},
    onLoad(){
      this.getmyServers();
    },
		methods: {
      //获取我的服务队列表
      getmyServers(){
        selectmyServers().then(response=>{
          this.ServersList=response.data
          console.log(this.ServersList)
        })
      },
			// 跳转search页面
			gotoSearch() {
				uni.navigateTo({
					url: '/pages/mine/search/search'
				})
			},
			// 点击跳转详情
			goToOrgInfo(teamid) {
        // console.log(teamid)
				uni.navigateTo({
					url: '/pages/mine/org-info/org-info?teamid='+teamid+'&type='+true,
				})
			}
		}
	}
</script>

<style lang="scss">
  
	.search-box {
		// 设置定位效果为吸顶
		position: sticky;
		// 吸顶的位置
		top: 0;
		// 提高层级，防止被轮播图覆盖
		z-index: 999;
	}

	.chat-custom-right {
		flex: 1;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		justify-content: space-between;
		align-items: flex-end;
	}

	.chat-custom-text {
		font-size: 12px;
		color: #999;
	}  
  .box {
    background-color: #ff2121;
    background: url('../../../static/images/dj2.png')  no-repeat center;
    background-size: 400px;
  }
  page{
    background: url('../../../static/images/dj2.png')  no-repeat center;
    background-size: 600px;
  }
</style>
